<template>
  <div>
    <p>tips: 只要点击下方按钮，就可以发送一个请求喔！</p>

    <h3>当前一共有{{ arrNum }}条信息</h3>
    <p>
      <button @click="getData">点击发送</button>
    </p>

    <ul>
      <li v-for="item in list" :key="item">
        <span>{{ item }}</span>
      </li>
    </ul>
  </div>
</template>

<script>
import { mapActions, mapState, mapGetters } from 'vuex'

export default {
  methods: {
    ...mapActions(['getData'])
  },
  computed: {
    ...mapState(['list']),
    ...mapGetters(['arrNum'])
  }
}
</script>

<style lang="less" scoped></style>
